home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
telecomm
/
bbsxdemo.lzh
/
OE
/
ORDUTIL.SCR
< prev
Wrap
Text File
|
1993-01-03
|
4KB
|
204 lines
script
abort off
STATUS_BOX (OFF)
; Script to allow printing and deleting of the Order Entry
; system's INFO and ORDER datasets.
; o Written 20-Oct-87 by Keith Ledbetter
; o Requires version 1.30 of the BBS
; --------------------------------------------------------
; Modified 3 Jan 93, R. Sanchez, C&R Systems. (r.s.)
string order_file = 'd:\bbsxdemo\oe\dat\orders.dat' ;where the datasets are
string info_file = 'd:\bbsxdemo\oe\dat\info.dat'
string option
integer rc
integer video_width = '&11'
string padding
string orders_printed = 'N'
string info_printed = 'N'
Ordering_Utilities:
clear screen
printe
printe '--------------------------------------' center
printe ' DEMO VERSION! MAY NOT BE UP TO DATE! ' center
printe '--------------------------------------' center
printe
printe '\i Order Entry Utilities \o' center
printe '\i ** Status ** \o' center
padding = ''
if video_width = 80 then
expand (padding, 30)
else
expand (padding, 10)
endif
print '[padding]Orders: '
if file_exists (order_file) then
printe 'PRESENT'
else
printe 'None present'
endif
print '[padding] Info: '
if file_exists (info_file) then
printe 'PRESENT'
else
printe 'None present'
endif
printe '\i ** Options ** \o' center
printe
printe '1. Show Order File' center
printe '2. Print Order File' center
printe '3. Delete Order File' center
printe
printe '4. Show Info File ' center
printe '5. Print Info File ' center
printe '6. Delete Info File ' center
printe
printe 'X. Exit ' center
printe
print 'Selection: ' center
input option 1 noreturn
if option = 'x' then
STATUS_BOX (ON)
exit
ef option = '1' then
gosub show_orders
ef option = '2' then
gosub print_orders
ef option = '3' then
gosub delete_orders
ef option = '4' then
gosub show_info
ef option = '5' then
gosub print_info
ef option = '6' then
gosub delete_info
endif
goto Ordering_Utilities
print_orders:
printe
print 'Ready printer, press <return>..' center
input option 1
rc = file_print (order_file)
if RC > 0 then
printe
BELL
printe 'Unable to print dataset!!' center
goto get_a_return
endif
orders_printed = 'Y'
return
show_orders:
if file_exists (order_file) then
view ('[order_file]', showall pagebrk)
printe 'End Of File' center
else
printe 'None present' CENTER
endif
printe 'Press <return>..' center
input option 1
return
delete_orders:
if orders_printed = 'y' then
goto DO_1
endif
printe
printe 'You haven\"t printed orders yet!' center
printe
print 'Delete anyway (y/n)? ' center
input option 1 noreturn
if option = 'n' then
return
endif
DO_1:
rc = file_delete (order_file)
printe
if RC > 0 then
BELL
printe 'Unable to delete dataset!!' center
else
printe 'Order dataset deleted!' center
endif
goto get_a_return
return
show_info:
if file_exists (info_file) then
view ('[info_file]', showall pagebrk)
printe 'End Of File' center
else
printe 'None present' CENTER
endif
printe 'Press <return>..' center
input option 1
return
print_info:
printe
print 'Ready printer, press <return>..' center
input option 1
rc = file_print (info_file)
if RC > 0 then
printe
BELL
printe 'Unable to print dataset!!' center
goto get_a_return
endif
info_printed = 'Y'
return
delete_info:
if info_printed = 'y' then
goto DI_1
endif
printe
printe 'You haven\"t printed that file yet!' center
printe
print 'Delete anyway (y/n)? ' center
input option 1 noreturn
if option = 'n' then
return
endif
DI_1:
rc = file_delete (info_file)
printe
if RC > 0 then
BELL
printe 'Unable to delete dataset!!' center
else
printe 'Info dataset deleted!' center
endif
goto get_a_return
return
get_a_return:
printe
print 'Press <return> to continue..' center
input option 1
return